<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="common/include :: header('新增客户信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-statement-add">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">企业名称：</label>
            <div class="col-sm-8">
                <input name="customerName" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">法定代表人：</label>
            <div class="col-sm-8">
                <input name="legalLeader" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">成立日期：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <input name="registerDate" class="form-control" placeholder="年 - 月 - 日" type="text" required>
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">经营状态：</label>
            <div class="col-sm-8">
                <select name="openState" class="form-control m-b" th:with="type=${@dict.getType('bus_open_state')}">
                    <option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}"  required></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">所属地区：</label>
            <div class="col-sm-8">
                <select name="province" class="form-control m-b" th:with="type=${@dict.getType('bus_province')}">
                    <option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}" required></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">所属行业：</label>
            <div class="col-sm-8">
                <input name="industry" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">注册资本：</label>
            <div class="col-sm-8">
                <input name="regCapital" class="form-control" type="number" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">注册地址：</label>
            <div class="col-sm-8">
                <input name="regAddr" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营范围：</label>
            <div class="col-sm-8">
                <input name="scope" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="common/include :: footer" />
<th:block th:include="common/include :: datetimepicker" />
<script th:inline="javascript">
    var prefix = ctx + "/business/customer";
    $("#form-statement-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-statement-add').serialize());
        }
    }

    // 时间控件
    $("input[name='registerDate']").datetimepicker({
        format: "yyyy-mm-dd",
        autoclose: true
    });
</script>
</body>
</html>